package com.kensure.shike.weixinpay.model;

import java.util.HashMap;
import java.util.Map;

import com.kensure.shike.constant.BusiConstant;

/**
 * 微信提现用的数据对象
 * 
 * @author Administrator
 *
 */
public class WXTixianinfo implements java.io.Serializable {

	private static final long serialVersionUID = 3545276994084105527L;
	private String mch_appid;// 小程序ID
	private String mchid;// 商户号
	private String device_info;// 设备号
	private String nonce_str;// 随机字符串
	private String sign;// 签名
	private String partner_trade_no;// 商户订单号
	private String check_name;// 校验用户姓名选项，NO_CHECK：不校验真实姓名 FORCE_CHECK：强校验真实姓名
	private String spbill_create_ip;// 终端IP
	private String amount;// 企业付款金额，单位为分
	private String desc;// 企业付款备注，企业付款备注，必填。注意：备注中的敏感词会被转成字符*
	private String openid;// 用户标识

	public String getMch_appid() {
		return mch_appid;
	}

	public void setMch_appid(String mch_appid) {
		this.mch_appid = mch_appid;
	}

	public String getMchid() {
		return mchid;
	}

	public void setMchid(String mchid) {
		this.mchid = mchid;
	}

	public String getDevice_info() {
		return device_info;
	}

	public void setDevice_info(String device_info) {
		this.device_info = device_info;
	}

	public String getNonce_str() {
		return nonce_str;
	}

	public void setNonce_str(String nonce_str) {
		this.nonce_str = nonce_str;
	}

	public String getSign() {
		return sign;
	}

	public void setSign(String sign) {
		this.sign = sign;
	}

	public String getPartner_trade_no() {
		return partner_trade_no;
	}

	public void setPartner_trade_no(String partner_trade_no) {
		this.partner_trade_no = partner_trade_no;
	}

	public String getCheck_name() {
		return check_name;
	}

	public void setCheck_name(String check_name) {
		this.check_name = check_name;
	}

	public String getSpbill_create_ip() {
		return spbill_create_ip;
	}

	public void setSpbill_create_ip(String spbill_create_ip) {
		this.spbill_create_ip = spbill_create_ip;
	}

	public String getAmount() {
		return amount;
	}

	public void setAmount(String amount) {
		this.amount = amount;
	}

	public String getDesc() {
		return desc;
	}

	public void setDesc(String desc) {
		this.desc = desc;
	}

	public String getOpenid() {
		return openid;
	}

	public void setOpenid(String openid) {
		this.openid = openid;
	}

	public WXTixianinfo(WXPayinfo info) {
		this.setMch_appid(info.getAppid());
		this.setMchid(info.getMch_id());
		this.setNonce_str(info.getNonce_str());
		this.setPartner_trade_no(info.getOut_trade_no());
		this.setAmount(info.getTotal_fee());
		this.setSpbill_create_ip(info.getSpbill_create_ip());
		this.setDesc(BusiConstant.name + "提现");
		this.setCheck_name("NO_CHECK");
		this.setOpenid(info.getOpenid());
	}

	/**
	 * 提现接口转map
	 * 
	 * @return
	 */
	public Map<String, Object> toUnitMap() {
		Map<String, Object> sParaTemp = new HashMap<String, Object>();
		sParaTemp.put("mch_appid", this.getMch_appid());
		sParaTemp.put("mchid", this.getMchid());
		sParaTemp.put("nonce_str", this.getNonce_str());
		sParaTemp.put("partner_trade_no", this.getPartner_trade_no());
		sParaTemp.put("amount", this.getAmount());
		sParaTemp.put("spbill_create_ip", this.getSpbill_create_ip());
		sParaTemp.put("check_name", this.getCheck_name());
		sParaTemp.put("openid", this.getOpenid());
		sParaTemp.put("desc", this.getDesc());
		return sParaTemp;
	}
}